package com.ea.controller.back;

import com.ea.api.controller.admin.AfterSaleInfoApi;
import com.ea.common.response.JsonResult;
import com.ea.domain.entity.OrderFormInfo;
import com.ea.mapper.OrderFormInfoMapper;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.List;

/**
 * @author NAME-L
 * @Description TODO
 * @className AfterSaleInfoController
 * @date 2022-12-06 20:47:22
 */
@RestController
@RequestMapping("/electric/back/aftersale")
public class AfterSaleInfoController implements AfterSaleInfoApi {

    @Autowired
    private OrderFormInfoMapper orderFormInfoMapper;

    @Override
    @PostMapping("/info/list")
    public JsonResult getAfterSaleInfoList() {
        List<OrderFormInfo> infoList = orderFormInfoMapper.selectAllByOrderIdList(Collections.singletonList(1235123452345l));
        List<OrderFormInfo> infoList2 = orderFormInfoMapper.selectAllByOrderIdList(Collections.singletonList(1235123452345l));
        System.out.println(infoList);
        System.out.println(infoList2);
        return JsonResult.doSuccessful(infoList);
    }

    @Override
    @PostMapping("/update/info")
    public JsonResult updateAfterSaleInfo() {
        return null;
    }

    @Override
    @PostMapping("/assig/work")
    public JsonResult assignWorks() {
        return null;
    }
}
